<?php
include_once("class.lib/db.class.php");
include_once("class.lib/domaine.class.php");

header('Content-type: text') ;
				  
				  
				  if($_POST['id']=='3')  $_POST['id']='2';
				  
				  $domaine  = new Domaine();
                  //$mentionlist = $mention->getAllMention($_POST['id']);
				  $domainelist = $domaine->getAllDomaine(strtok($_POST['id'],"id="));
				  
     			  $libelle="domaine";	
				  
 
echo "<select name=\"".$libelle."\" id=\"".$libelle."\" maxlength=\"23\"
 OnChange=\" if(this.value=='autre') { document.getElementById('autredomaine').style.display ='';} else {sendData('id='+this.value,'mention.php','mention_liste');}\" 
onKeyUp=\"if(this.value=='autre') { document.getElementById('autredomaine').style.display ='';} else {sendData('id='+this.value,'mention.php','mention_liste')}\" class=\"validate-selection\" title=\"Veuillez selectionner un domaine SVP!\">";


				  // Liste des mentions
				    echo "<OPTION value=\"\">choisissez le domaine de formation</OPTION>";
				    echo "<OPTION value=\"autre\">Autres</OPTION>";
					 while (list($clef,$valeur)=each($domainelist)) 
						 {
							echo "<OPTION value=$valeur[0]>$valeur[1]</OPTION>";
						 }

 echo "</select>";
 
 ?>
